package com.cx.base.day15_socket.udp.user1;

import java.net.DatagramSocket;
import java.net.SocketException;

public class Chat1 implements Runnable {
    DatagramSocket ds;

    @Override
    public void run() {
        try {
            ds = new DatagramSocket(10001);
            Thread thread1 = new Thread(new Receive(ds));
            Thread thread2 = new Thread(new Send(ds));
            thread1.start();
            thread2.start();
        } catch (SocketException e) {
            e.printStackTrace();
        }
    }
}
